package com.lrs.java.j2se_self._example.countWords;

import java.io.IOException;
import java.util.Properties;

public class PropertyMgr {
	static Properties props = new Properties();
	
	static {
		try {
			props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("config/DBConnect.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static String getProperty(String key) {
		String value = props.getProperty(key);
		return value;
	}
}


/*public class PropertyMgr {
	static Properties props = null;
	
	static {
		try {
			props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("config/DBConnect.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static String getProperty(String key) {
		String value = props.getProperty(key);
		return value;
	}
}*/
